package pri.zxx.testdemo;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @author xigua
 * @desc
 * @createTime 2022-03-31-下午9:21
 */
@Data
@Accessors(chain = true)
public class AnimalTest {
   public int x = 1;

    public AnimalTest() {
        System.out.println("animal");
    }
}

@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
class Dog extends AnimalTest {
    public int x = 2;

    public Dog() {
        System.out.println("dog");
    }

    public static void main(String[] args) {
        AnimalTest animalTest = new Dog();
        System.out.println(animalTest.x);
    }
}
